<?php
include_once("../includes/cls.main.php");
$oPagina = new main();

if( empty ( $_GET["id"] ) )
{
	header("location:../");
}
else
{
	$id_sumario = $_GET["id"];
	$aDados = $oPagina->pagina( $id_sumario );
	
	if( ! empty ( $aDados ) )
	{
		foreach( $aDados as $sItens )
		{
			$id_pagina      = $sItens["id"];
			$titulo         = $sItens["titulo"];
			$subtitulo      = $sItens["subtitulo"];
			$detalhes       = $sItens["detalhes"];
			$id_colaborador = $sItens["id_colaborador"];
			$colaborador    = $sItens["nome_colaborador"];
			$indicar        = $sItens["indicar"];
		}
	}
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $titulo; ?></title>
<meta name="author" content="Luiz Paulo Araujo Pedrosa e Daniel Machado Maffioletti" />
<meta http-equiv="Content-Language" content="pt-br"/>
<style>
h1#reformador
{
	font-family:Arial, Helvetica, sans-serif;
	margin:0px; padding:0;
	border:#000 solid 0px;
	background:url(../img/logo-impressao.jpg) center no-repeat;
	width:100%; height:70px;
	text-indent:-5000px;
	border:#000 solid 0px;
}
h2#feb
{
	font-family:Arial, Helvetica, sans-serif;
	margin:0px; padding:0;
	float:left;
	clear:left;
	border:#000 solid 0px;
}
p#ano
{
	font-family:Arial, Helvetica, sans-serif;
	margin:0px; padding:0;
	float:right;
	border:#000 solid 0px;
	font-size:12px;
}
div#content
{
	font-family:Arial, Helvetica, sans-serif;
	border:#000 solid 0px;
	clear:both;
	font-size:12px;
}
div#content img
{
	text-align:right;
}
div#content h1
{
	font-family:Arial, Helvetica, sans-serif;
	text-align:center;
	padding-top:50px;
	font-size:18px;
	font-weight:bold;
}
</style>
<script>
window.onload = function()
{
	window.print();	
}
</script>
</head>
<body>
<h1>Revista Capoterapia</h1>
    <div id="content">
          <h1><?php echo $titulo; ?></h1>
          <h2><?php echo $subtitulo; ?></h2>
          <p>
		  <?php
          
			if($id_colaborador == 16)
			{
				echo "&nbsp;";
			}
			else
			{
				echo $colaborador;  
			}
			
		  ?>
          </p>
		  <?php 
		  	echo $detalhes; 
		  ?> 
	</div>
</body>
</html>
